package cn.JHai.rbac.mapper;

import cn.JHai.rbac.domain.Employee;
import cn.JHai.rbac.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);

    Long selectForCount(QueryObject queryObject);

    List<Employee> pageSelect(QueryObject queryObject);


    void deleteRelation(Long id);

    void  insertEmployeeAndRoleRelation(@Param("employeeId") Long employeeId, @Param("roleId") Long roleId);

    Employee login(@Param("userName") String userName);
}